import { DataTypes} from 'sequelize';
import {sequelize} from '../db/sequelize.js';


// 定义模型
const User = sequelize.define('User', {
  // 定义字段
  firstName: {
    type: DataTypes.STRING,
    allowNull: false,
  },
  lastName: {
    type: DataTypes.STRING,
    allowNull: false,
  },
  age:{
    type:DataTypes.STRING,
    allowNull:false,
  },
  email: {
    type: DataTypes.STRING,
    allowNull: false,
    unique: true,
  }
});

// (async () => {
//   await sequelize.sync({ force: true });
//   // 这里是代码
// })();

export default User;